package Xml;

import java.util.List;
import java.util.Map;

import Xml.XML.src.domVSsax.SaxServer;

public class XMLparesersample {

	public static void main(String[] args) {
		long start = System.currentTimeMillis();
		List<Map<String,String>>domList = DomService.readXML("sample.xml","student");
		System.out.println(domList.size());
		System.out.println("Parse the xml by dom in"+(System.currentTimeMillis()-start));
		
		start = System.currentTimeMillis();
		List<Map<String,String>> saxList = SaxServer.readXML("sample.xml","root");
		System.out.println(saxList.size());
		System.out.println("Parse the xml by sax in "+(System.currentTimeMillis()));
	
	}

}
